package Server;

import model.Student;
import model.User;

/**
 * 学员的账号密码
 */
public class UserDao {
    private Student student;

    public UserDao(Student student) {
        this.student = student;
    }
    // 判断是否是该学生的方法
    public boolean judgeStudent(String name){

        if((student.getUser().getUserName()).equals(name)){
                return true;
        }
        return false;
    }
   /* @Override
    public boolean equals(Object obj) {
        if (obj instanceof User){
            User user = (User) obj;
            return (student.getUser().getUserName().equals(user.getUserName()))&&(student.getUser().getPassword().equals(user.getPassword()));
        }
        return false;
    }
    @Override
    public int hashCode() {
        int result = student.getUser().getUserName().hashCode();
        result = 31 * result + student.getUser().getPassword().hashCode();
        return result;
    }*/
}


